<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php echo $facebook->html(); ?>

<head>
    <?php echo $this->Html->charset(); ?>
    <title>
        <?php __('Didded'); ?>
        <?php echo $title_for_layout; ?>
    </title>        
    <?php
    echo $this->Html->meta('icon');
    echo $this->Html->css(array('cake.generic', 'jNice', 'jquery.jscrollpane', 'nivo-slider', 'template', 'jquery-ui'));
    ?>
    <script type="text/javascript">
        baseUrl="<?php echo Configure::read("baseUrl"); ?>";
    </script>
    <?php
    echo $this->Html->script(array('jquery', 'jquery.main', 'smartrollover', 'jNice', 'jquery.jscrollpane.min', 'jquery.mousewheel', 'jquery-ui.min'));

    echo $scripts_for_layout;
    ?>
    <script type="text/javascript">
        jQuery.noConflict();
        jQuery(document).ready(function() {    
                
            jQuery(".createPopup").click(function(e){
                e.preventDefault();
                showPop(this);
            });
                
            jQuery(document).keypress(function(a){
                if((a.keyCode==27) && (popupStatus==1)){
                    disablePopup();
                }
            });
            jQuery("a.closeOption").click(function(){
                disablePopup();
                return false});
                
            jQuery("#accordion").accordion();
        });
        //NIVO SLIDER
        jQuery(window).load(function() {
            jQuery('.nivoSlider').nivoSlider({
                effect:'fade', // Specify sets like: fold,random, fade,sliceDown
                slices:15, // For slice animations
                boxCols: 8, // For box animations
                boxRows: 4, // For box animations
                captionOpacity:1,
                animSpeed:500, // Slide transition speed
                pauseTime:3000, // How long each slide will show
                startSlide:0, // Set starting Slide (0 index)
                directionNav:false, // Next & Prev navigation
                directionNavHide:true, // Only show on hover
                controlNav:true // circles navigation
            });
                
        });	
    </script>
    <?php //echo $this->Auth->User('id');?>
</head>
<body> 
<style type="text/css"> 
a.fb_button:active .fb_button_text, a.fb_button_rtl:active .fb_button_text, .fb_button:active .fb_button_text, .fb_button_rtl:active .fb_button_text{background: url("<?php echo Configure::read('baseUrl'); ?>img/facebook_on.png") no-repeat scroll 0 0;border:0;}
.fb_button .fb_button_text, .fb_button_rtl .fb_button_text{ 
    background: url("<?php echo Configure::read('baseUrl'); ?>img/facebook_off.png") no-repeat scroll 0 0;    
    border-bottom: 0px solid #1A356E;   border-top: 0px solid #879AC0;color: #FFFFFF;display: block;font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;font-size:22px;height: 54px;margin: 0;padding: 45px 0 0 45px;position: absolute;right: 10px;text-shadow: none;top: 10px;
    width: 122px;z-index:999;letter-spacing:normal;}
.fb_button_text:hover{background: url("<?php echo Configure::read('baseUrl'); ?>img/facebook_on.png") no-repeat scroll 0 0;}
</style>
    
    <div class="wrapper">
        <div class="header">
            <div class="hdlft"><a href="<?php echo Configure::read('baseUrl'); ?>"><?php echo $this->Html->image("logo.gif", array("alt" => "Didded logo", "width" => "106", "height" => "45", "border" => "0", "class" => "logo")); ?></a> <?php echo $this->Html->image("title.gif", array("alt" => "Progrees bar")); ?></div>
            <div class="hdrht">
                <?php
                echo $this->Html->image("request_off.png", array("alt" => "SignUp", "class" => "pad", "width" => "167", "height" => "51"));
                    
                if ($session->read('Auth.User.id')) {
                    //echo $this->Html->image("request_off.png", array("alt" => "SignUp", "class" => "pad", "width" => "167", "height" => "51")),array('escape' => false, 'title' => 'CREATE A PROFILE');
                    
                } else {

//                    echo $this->Html->link(
//                            $this->Html->image("createprofile_off.png", array("alt" => "SignUp", "class" => "pad", "width" => "166", "height" => "50")), "/users/add/", array('escape' => false, 'class' => "createPopup", 'title' => 'CREATE A PROFILE')
//                    );
                }
                ?>
                <div class="topnav">
                    <a href="<?php echo Configure::read('baseUrl'); ?>">home</a> <a href="<?php echo Configure::read('baseUrl'); ?>pages/contact">contact</a> <a href="<?php echo Configure::read('baseUrl'); ?>pages/about_us">about</a> <a href="<?php echo Configure::read('baseUrl'); ?>pages/faq">FAQ</a>
                </div>
<!--                <a href="<?php echo Configure::read('baseUrl'); ?>users/popup_login" class="createPopup" title="Login Form"><?php echo $this->Html->image("facebook_off.png", array("class" => "fb", "width" => "165", "height" => "103")); ?></a-->
                <?php
                echo $facebook->login(array('show-faces' => false, 'width' => 165, 'height' => 103,'perms' => 'email,user_about_me,user_interests,user_location,user_activities,read_friendlists,user_birthday,user_interests'),"sign in");
                ?>
            </div>
        </div>
        <div id="content">

            <?php  echo $this->Session->flash();?>

            <?php echo $content_for_layout; ?>
            <?php echo $facebook->init(); ?> 
        </div>
       <?php // echo $this->element("footer_menu", array("cache" => true));?>
        <div class="footer"><a href="<?php echo Configure::read('baseUrl'); ?>">home</a><a href="<?php echo Configure::read('baseUrl'); ?>pages/terms_conditions">terms</a><a href="<?php echo Configure::read('baseUrl'); ?>pages/privacy">privacy</a>
            <?php if ($session->read('Auth.User.id')) { ?>
                <a href="<?php echo Configure::read('baseUrl'); ?>users/logout">sign out</a>
            <?php } else { ?>
                <?php
                //echo $facebook->login(array('show-faces'=>false,'width'=>165,'height'=>103,'perms' => 'email,read_stream,publish_stream'));
                ?>
                <a href="<?php echo Configure::read('baseUrl'); ?>users/login" title="Login Form">sign in</a>
            <?php } ?>

        </div>
    </div>

    
    <div class="popupBg">&nbsp;</div>

    <div class="popupWrapper" id="create-profile-popup" style="display:none;">
        <a href="javascript:void(0)" class="closeOption">&nbsp;</a>
        <span class="arrowInd arrowTopSide">&nbsp;</span>
        <div class="popupTitleBar"><div class="popupTitleRight"><div></div></div></div>
        <div class="popupContent">
            <div class="popupYbgRight">
                <div class="popupX">

                </div>
            </div>
        </div>
        <div class="popupBottomBar"><div class="popupBottomRight"><div>&nbsp;</div></div></div>
    </div>
    

<?php echo $this->element('sql_dump'); ?>
</body>
</html>